﻿using System;
using System.Linq;

    class SumOfFactAndPaws
    {
        static void Main(string[] args)
        {
            double n = 5;
            double x = 2;
            double sum = 1;
            double divider=1;
            int factorial = 1;
            for (int i = 1; i <= n; i++)
            {
                divider = divider * x;
               
                for (int k = 1; k <= i; k++)
                {
                    factorial = factorial * k;
                  
                }
                sum = sum + (factorial / divider);
                factorial = 1;
            }
            Console.WriteLine(sum);
           
        }
    }

